<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class TaskRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'client_id'         => 'bail|required',
            'car_id'    => 'bail|required',
            'worker_id' => 'bail|required|max:200',
           
        ];
    }

    /**
     * 错误信息
     * @return array
     */
    public function messages()
    {
        return [
            'client_id.required'    => '请选择客户',
            'car_id.required'       => '请选择车辆',            
            'worker_id.required'    => '请选择技师',          
        ];
    }

    
}
